package com.erp.programmer.dto;

import com.erp.programmer.annotation.ValidateEntity;

public class PermissionDto {
    /**
     * 权限ID
     */
    private String id;

    /**
     * 权限名称
     */
    @ValidateEntity(required=true,requiredMaxLength=true,requiredMinLength=true,maxLength=32,minLength=1,errorRequiredMsg="权限名称不能为空！",errorMaxLengthMsg="权限名称长度不能大于8！",errorMinLengthMsg="权限名称长度不能小于1！")
    private String name;

    /**
     * 角色ID
     */
    @ValidateEntity(required=true,requiredMaxLength=true,requiredMinLength=true,maxLength=19,minLength=19,errorRequiredMsg="角色ID不能为空！",errorMaxLengthMsg="角色ID不能大于19！",errorMinLengthMsg="角色ID长度不能小于19！")
    private String roleId;

    /**
     * 权限描述
     */
    @ValidateEntity(required=true,requiredMaxLength=true,requiredMinLength=true,maxLength=128,minLength=1,errorRequiredMsg="权限描述不能为空！",errorMaxLengthMsg="权限描述长度不能大于128！",errorMinLengthMsg="权限描述长度不能小于1！")
    private String description;

    private RoleDto roleDto;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public RoleDto getRoleDto() {
        return roleDto;
    }

    public void setRoleDto(RoleDto roleDto) {
        this.roleDto = roleDto;
    }

    @Override
    public String toString() {
        return "Permission{" +
                "id=" + id +
                ", name=" + name +
                ", roleId=" + roleId +
                ", description=" + description +
                "}";
    }

}
